package com.fish.design.create.factorymethod;

/**
 * @PACKAGE_NAME: com.fish.design.create.factorymethod
 * @Author: wangyingbin
 * @Date: 2021/12/20 20:11
 * @Description:
 */

public class SenderFactory {
    public Sender getSender(String type){
        if("sms".equals(type)){
            return new SmsSender();
        }else if("email".equals(type)){
            return new EmailSender();
        }else{
            return null;
        }
    }
}
